export default {
    defaultKeyBoard: {
        type: {
            type: [String],
            required: false,
            default: "number", //zh,en,number
        },
        //如果type是mix类型，默认使用的是什么输入法
        //cn还是en，默认是cn
        inputLang: {
            validator: function (value) {
                return ["cn", "en"].indexOf(value) !== -1;
            },
            default: () => "cn",
        },
        getInputInfo: {
            type: [Object],
        },
        //是否禁用被input组件更正默认的语言类型,但是不禁用用户在键盘上面切换语言
        //默认否
        disabledInputUpdateMixKeyBoardLang: {
            type: Boolean,
            default: () => false,
        },
        keyBoardMaps: {
            validator: function (value) {
                return (
                    String.prototype.slice.call(value) === "[object Object]",
                    "cnMap" in value &&
                    "enMap" in value &&
                    "numberMap" in value &&
                    Array.isArray(value["cnMap"]),
                    Array.isArray(value["enMap"]),
                    Array.isArray(value["numberMap"])
                );
            },
        },
    },
    numberKeyBoard: {
        show: {
            type: [Boolean, Number],
            default: false,
        },
        //将 theme 属性设置为 custom 来展示键盘的右侧栏，常用于输入金额的场景。
        theme: null,
        extraKey: {
            type: [String, Number, Array, undefined],
            default: () => ".",
        },
        closeButtonText: {
            type: [String, Number],
            default: () => "完成",
        },
        title: {
            type: [String, undefined, Number],
            default: () => undefined,
        },
        value: [String, Number, undefined],
        maxLength: {
            type: Number,
            default: () => -1,
        },
        randomKeyOrder: {
            type: Boolean,
            default: () => false,
        },
    },
};